The code allows any admin to ban someone, taking the LFS UserName as $argv, while the ban will be for 1 day.
Of course you can set it to more days if you wish (I think 999 days is the maximum).
If you set it to 0, the ban will last for 12 hours.
Before the ban is executed, a private message will be send to the player receiving the ban.
If you want to send a general message, replace the line starting with "privMsg" with something like this: cmdLFS ( "/msg Player X has been banned for Y days" );
When it's needed to make the ban variable in length, you will need to code a simple form in which you type the LFS UserName and ban length and then submit the form, after which Lapper will execute the ban using the given values.
If you are really going for gold, you could grab the LFS UserNames from the people currently connected to your server and select one of them from there.
Your answer made me doubt myself (sign of weakness, I know) so I double checked.
I've set one of my servers to mode S3 in the config file and started it.
Chosen track is AS1 and car is XFG.
Then I tried connecting to it with my S2 license and I am able to connect to it.
It has always been the case that the settings and content running on the server, decides who can and can't connect.
If the settings and content are within the S1 license, people with that license can connect to it, even if mode is set to S2 or S3.
Thanks for the update Scawen en Eric and Merry Christmas to the whole LFS dev. team and there loved ones.
Can't understand the people who are complaining.
First of all, nobody is forcing you to upgrade to S3, so just install the patch and enjoy the updated graphics on all the S1/S2 content.
If you do decide to upgrade, you have paid 36 pounds over so many years, which is very cheap compared to games that sell sequels every year and are probably not played as often as you did with LFS.
This is correct and should work as intended.
Of course you need to replace "[YOUR MESSAGE HERE]" with any text you want to be displayed, but as it is right now, it should display that text every 5 minutes.
You need to delete the whole section that you have selected in the screenshot.
Then also delete the whole Sub SA_mid and SA_newyear, since that won't be needed anymore.
Then you will be good to go.
On a side note, if you really need to ask how to use the code presented to you, then you have no idea at all, of how Lapper is working.
So it would be a good idea to try and understand how the Lapper scripts work, what is happening at which point, etc.
Otherwise you will end up doing copy/paste, without having a clue what is happening.
Find the OnLapperStart event in your main LPR file.
Then replace the code within that event, with the code I have given you.
Add the sub-event Auto_message below that event
Add the message you want to display and you are fine to go
When do you want an automatic message?
I've said it before, please be as complete as possible when asking questions or explaining problems with Lapper.
Otherwise we can (and won't) help you.
It might not be related to your problem at all, but do you have any bandwidth monitoring software running on your pc?
I've had this with someone from the team I work for and that caused more or less the same issue as you described.
Well, I will be honest with you, a lot is wrong with your code.
You messed up commands and you didn't used the catchevent properly.
So I have re-arranged and corrected your code.
I've only tested it to see if it runs without errors now (which is the case), but haven't tested if it does what you want it to do.
- Download the file
- Rename it to sector_times3.lpr
- Put it in the "includes" folder
Have you ever looked at the actual code and read through changes.txt (found in the 'doc' folder of Lapper) to see all that is possible with Lapper?
I don't mind writing scripts that are (a bit) complicated, but something as basic as putting a message on the screen when someone enters, is very basic.
Not to mention the fact that these kind of wishes are useful to learn how Lapper works.
Here's version 1.01 of the Admin notify script, which sends a global message when an admin enters the server.
If you don't want the HUD to be shown, put a # at the start of this line:
- Download the file and save it somewhere on your computer
- Rename the file from "admin_notify.txt" to "admin_notify.lpr"
- Place the file in the 'includes' folder, found in 'bin\default\'
- Open file "addonsused.lpr" which is also in the 'includes' folder
- Add a line under 'General includes' saying: include ("./admin_notify.lpr");
- Save file "addonsused.lpr"
- Start Lapper
To add or remove admins, open file "admin.txt" which is found in the 'default' folder.
You have to state the LFS username of each admin, one per line.
Here's another update on the project.
I didn't got as much done this weekend as I hoped for, but still made good progress.
While testing the software, I figured it would be nice to be able to define streets as a one way or a two way direction.
So I've added that into the module to define streets with.
Once that was done, I thought about a penalty for driving into a street from the wrong direction.
So that had to be added too and then things started to go from bad to worse.
This afternoon it nearly was too much to handle and I was this close to delete all the files from my computer and give up on the project (yeah yeah, I am hot headed from time to time).
After a break I saw the light and as often, a big re-write of the code, put back all things in place again.
While doing that I've also added a counter that registers how many violations a person has open at that time.
So while every violation makes the offender vulnerable to be chased and booked within 120 seconds (and each violation within that period, will add another 120 seconds to that counter), it would also make them a bigger fish to catch for the police.
The idea is that each violation will enable 1 cop to chase and try to book you.
So with 2 open violations and a maximum of 240 seconds on the clock, 2 cops and try to chase and book you.
With 3 open violations, 3 cops can chase you, and so on and so on.
The part about how many cops can chase you and how the booking should go (of course only 1 cop can be awarded 'the kill'), has still to be written and is next up my list.
After Lapper has started, drive your car to the point you want the node to be and then type: !setnode
Then the node will stay registered for as long as Lapper keeps running.
After a restart of Lapper, you have to set the node again.
Just anywhere you want.
Drive to point you want to add the node and then type: !setnode
That will register the current node and set a counter to 0.
As soon as someone enters that node, the counter will be raised by 1 and as soon as someone leaves the node, it will be lowered by 1.
If the counter is at 3 and a 4th person enters the node, that last person will be spectated.
Be aware though, nodes are only working on regular tracks, since all X and Y tracks (aka open configs) will always return 0 when current node is used.
-Download and save the file
-Rename it to: parc_ferme.lpr
-Place the file in the "includes" folder
-Open addonsused.lpr
-Add the following line in the "General includes" sections: include( "./parc_ferme.lpr");
Yeah it's possible to define a node and then count how many cars are on that node.
If the counter reaches 4, the last one who entered the node, is spectated.